<template>
    <div>
        <h2>学生姓名：{{name}}</h2>
        <h2>学生年龄{{age}}</h2>
        <button @click="sendMessage">发送消息</button>
    </div>
</template>
<script>
export default {
    name:'Test',
    setup() {
        let name = 'xfj'
        let age = 10
        
        function sendMessage(){
            alert("我是你的爹")
        }

        return{
            name,
            age,
            sendMessage
        }
    }
}
</script>
<style>
    
</style>